package com.example.sdb;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class SchemeFirstActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        Uri uri = getIntent().getData();
//        if (uri != null) {
//            //获取指定参数值
//            String type = uri.getQueryParameter("type");
//            Log.e( "UrlUtils","main: " + type);
//
////            if(type.equals("yangchong")){
////                ActivityUtils.startActivity(GuideActivity.class);
////            }else if(type.equals("main")){
////                ActivityUtils.startActivity(MainActivity.class);
////            }
//        }
//        finish();
        setContentView(R.layout.activity_cheme_view);

        Intent intent = getIntent();
        Uri data = intent.getData();
        if (data != null) {
            // 获取传递的参数
            String param = data.getQueryParameter("param");
            // 根据需要处理参数
        }
    }
}